/*
 * Academic License - for use in teaching, academic research, and meeting
 * course requirements at degree granting institutions only.  Not for
 * government, commercial, or other organizational use.
 * File: autobase_rtwutil.c
 *
 * MATLAB Coder version            : 3.4
 * C/C++ source code generated on  : 31-Oct-2022 18:36:01
 */

/* Include Files */
#include "rt_nonfinite.h"
#include "autobase.h"
#include "autobase_rtwutil.h"

/* Function Definitions */

/*
 * Arguments    : float u
 * Return Type  : float
 */
float rt_roundf_snf(float u)
{
  float y;
  if ((float)fabs(u) < 8.388608E+6F) {
    if (u >= 0.5F) {
      y = (float)floor(u + 0.5F);
    } else if (u > -0.5F) {
      y = u * 0.0F;
    } else {
      y = (float)ceil(u - 0.5F);
    }
  } else {
    y = u;
  }

  return y;
}

/*
 * File trailer for autobase_rtwutil.c
 *
 * [EOF]
 */
